package cn.csc.module.member.convert.browsinghistory;

import cn.csc.framework.common.pojo.PageResult;
import cn.csc.module.member.api.browsinghistory.dto.ProductBrowsingHistoryRespDTO;
import cn.csc.module.member.controller.app.browsinghistory.vo.*;
import cn.csc.module.member.dal.dataobject.browsinghistory.ProductBrowsingHistoryDO;
import cn.csc.module.product.api.spu.dto.SpuDTO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 商品浏览记录 Convert
 *
 * @author liuchuang
 */
@Mapper
public interface ProductBrowsingHistoryConvert {

    ProductBrowsingHistoryConvert INSTANCE = Mappers.getMapper(ProductBrowsingHistoryConvert.class);

    ProductBrowsingHistoryDO convert(AppProductBrowsingHistoryCreateReqVO bean);

    ProductBrowsingHistoryDO convert(AppProductBrowsingHistoryUpdateReqVO bean);

    AppProductBrowsingHistoryRespVO convert(ProductBrowsingHistoryDO bean);

    List<AppProductBrowsingHistoryRespVO> convertList(List<ProductBrowsingHistoryDO> list);

    List<AppProductBrowsingHistoryWithSpuRespVO> convertList1(List<SpuDTO> list);


    PageResult<AppProductBrowsingHistoryRespVO> convertPage(PageResult<ProductBrowsingHistoryDO> page);

    List<AppProductBrowsingHistoryExcelVO> convertList02(List<ProductBrowsingHistoryDO> list);

    List<ProductBrowsingHistoryRespDTO> convertList03(List<ProductBrowsingHistoryDO> list);

}
